/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wasolicitudesfiec.servlets;

import com.thoughtworks.xstream.XStream;
import entidad.ayudantias.Solicitudayudantia;
import entidad.ayudantias.Solicitudserayudante;
import java.io.*;
import java.net.*;
import entidad.cambioCarrera.Solicitudcambiocarrera;
import java.sql.SQLException;
import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.*;
import javax.servlet.http.*;
import wasolicitudesfiec.logicacontrol.Logica;

/**
 *
 * @author kabad
 */
public class ServletContrato extends HttpServlet {

    /** 
     * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
     * @param request servlet request
     * @param response servlet response
     */
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        HttpSession session;
        String actividad;
        String instancia;
        String idModelo;
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        actividad = request.getParameter("actividad");
        idModelo = request.getParameter("idModelo");
        int idSolicitud = Integer.parseInt(request.getParameter("idSolicitud"));
        if (idModelo.equals(Logica.modelo_SolicitarAyudantes)) {
        } else if (idModelo.equals(Logica.modelo_SolicitarSerAyudante)) {
        } else if (idModelo.equals(Logica.modelo_SolicitarCambioCarrera)) {
            try {
                generarInformeSolicitudCambio(idSolicitud, request, response);
            } catch (SQLException ex) {
                Logger.getLogger(ServletContrato.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        out.close();
    }

    private void generarInformeSolicitudCambio(int idSolicitud, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException {
       }
    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">

    /** 
     * Handles the HTTP <code>GET</code> method.
     * @param request servlet request
     * @param response servlet response
     */
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        processRequest(request, response);
    }

    /** 
     * Handles the HTTP <code>POST</code> method.
     * @param request servlet request
     * @param response servlet response
     */
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        processRequest(request, response);
    }

    /** 
     * Returns a short description of the servlet.
     */
    public String getServletInfo() {
        return "Short description";
    }
    // </editor-fold>
}
